Drought · Precipitation Deficit Index

DDI – Drought Degree Index

DDI (Drought Degree Index) quantifies the cumulative rainfall deficit relative to a long-term climatological mean, and is used to characterize the severity and duration of drought events.

1. Scientific Definition

The Drought Degree Index (DDI) measures how much and how long precipitation stays below its climatological mean over a given period (e.g. growing season or hydrological year).

Formula (monthly form)

DDI = Σi=1..n max(0, (Pclim − Pi) / Pclim)

  • Pclim – long-term mean precipitation for that month
  • Pi – observed precipitation in month i
  • n – number of months in the target period

Interpretation

  • DDI ≈ 0 → near/above normal rainfall (no drought)
  • Higher DDI → stronger and/or longer rainfall deficit (more severe drought)

Applications

  • Agricultural drought monitoring over seasons
  • Hydrological and meteorological drought analysis
  • Regional drought severity mapping from satellite rainfall data

2. Data Requirements

Precipitation Datasets (example)

  • CHIRPS Monthly – UCSB-CHG/CHIRPS/Monthly
  • Any gridded gauge/satellite rainfall product with long-term record

Temporal Dimension

  • Reference period for climatology (e.g. 1981–2010)
  • Target period to compute DDI (e.g. 2020–2023 growing seasons)

Suggested Palette

[ "#f7fcf5", "#d9f0d3", "#addd8e", "#78c679", "#31a354", "#006837" ]

3. Google Earth Engine Code – DDI (from CHIRPS Monthly)


// DDI – Drought Degree Index (monthly rainfall deficit)
// DDI = sum over months of max(0, (P_clim - P_i) / P_clim)

// AOI
var roi = geometry;
Map.centerObject(roi, 6);

// ----------------------
// 1. Load CHIRPS Monthly
// ----------------------
var chirps = ee.ImageCollection("UCSB-CHG/CHIRPS/Monthly")
  .filterBounds(roi);

// Reference climatology period (e.g. 1981–2010)
var refStart = "1981-01-01";
var refEnd   = "2010-12-31";

// Target drought analysis period (e.g. 2020–2023)
var tgtStart = "2020-01-01";
var tgtEnd   = "2023-12-31";

// ----------------------
// 2. Build monthly climatology (mean rainfall per calendar month)
// ----------------------
var refCol = chirps.filterDate(refStart, refEnd);

var months = ee.List.sequence(1, 12);

var climList = months.map(function(m) {
  m = ee.Number(m);
  var monthCol = refCol.filter(ee.Filter.calendarRange(m, m, "month"));
  var clim = monthCol.mean()
    .set("month", m)
    .rename("P_clim");
  return clim;
});

var climCol = ee.ImageCollection(climList);

// Helper: get climatological mean for each month as image
function addMonth(img) {
  var m = ee.Date(img.get("system:time_start")).get("month");
  return img.set("month", m);
}

// ----------------------
// 3. Target period rainfall with month property
// ----------------------
var tgtCol = chirps
  .filterDate(tgtStart, tgtEnd)
  .map(addMonth);

// Join target collection with climatology by month
var join = ee.Join.inner();
var filter = ee.Filter.equals({leftField: "month", rightField: "month"});

var joined = join.apply(tgtCol, climCol, filter);

// Compute monthly deficit fraction = max(0, (P_clim - P) / P_clim)
var deficitImages = joined.map(function(pair) {
  pair = ee.Dictionary(pair);
  var P = ee.Image(pair.get("primary")).select("precipitation");
  var Pclim = ee.Image(pair.get("secondary")).select("P_clim");
  
  var deficit = Pclim.subtract(P)
    .divide(Pclim)
    .max(0)            // max(0, ...)
    .rename("deficit")
    .copyProperties(P, ["system:time_start", "month"]);
    
  return deficit;
});

var deficitCol = ee.ImageCollection(deficitImages).map(function(img){
  return img.clip(roi);
});

// ----------------------
// 4. DDI = sum of monthly deficit over target period
// ----------------------
var ddi = deficitCol.sum().rename("DDI");

// Optional: scale or cap values (e.g. 0–3)
ddi = ddi.clamp(0, 3);

// ----------------------
// 5. Visualization
// ----------------------
var vis = {
  min: 0,
  max: 3,
  palette: [
    "#f7fcf5","#d9f0d3","#addd8e",
    "#78c679","#31a354","#006837"
  ]
};

Map.addLayer(ddi, vis, "DDI – Drought Degree Index");

// ----------------------
// 6. Export DDI
// ----------------------
Export.image.toDrive({
  image: ddi,
  description: "DDI_export",
  fileNamePrefix: "DDI_CHIRPS_2020_2023",
  region: roi,
  scale: 5000,   // ~5 km (CHIRPS native ~0.05°)
  crs: "EPSG:4326",
  maxPixels: 1e13
});